package com.test.router.system.base;

import com.test.router.system.core.ResultResp;
import com.test.router.system.model.http.Request;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;

/**
 * Created by alan.luo on 2017/9/18.
 */
public interface IDefaultRestController {

    ResultResp<Map<String, Object>> doGet(HttpServletRequest request, HttpServletResponse response);

    ResultResp<Map<String, Object>> doPost(Request<Map<String,Object>> obj, HttpServletRequest request, HttpServletResponse response);

    ResultResp<Map<String, Object>> doPut(Integer id, Request<Map<String,Object>> obj, HttpServletRequest request, HttpServletResponse response);

    ResultResp<Map<String, Object>> doDelete(Integer id, HttpServletRequest request, HttpServletResponse response);
}
